Now that Overview is able to ease into any state, be it window
picker or app grid, we can move this ViewSelector method to
Overview itself, which is its rightful place to live.
Remove ViewSelector.showApps(), and make all callers call
Main.overview.show(ControlsState.APP_GRID). Also make sure the
show apps button is correctly toggled.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1624>
this.show();
}
+ showApps() {
+ this._show(OverviewControls.ControlsState.APP_GRID);
+ }
+
getShowAppsButton() {
logError(new Error('Usage of Overview.\'getShowAppsButton\' is deprecated, ' +
'use \'dash.showAppsButton\' property instead'));
}
animateToOverview(state, callback) {
+ this._ignoreShowAppsButtonToggle = true;
+
this.viewSelector.prepareToEnterOverview();
this._stateAdjustment.value = ControlsState.HIDDEN;
callback();
},
});
+
+ this.dash.showAppsButton.checked =
+ state === ControlsState.APP_GRID;
+
+ this._ignoreShowAppsButtonToggle = false;
}
animateFromOverview(callback) {
const Screenshot = imports.ui.screenshot;
const { loadInterfaceXML } = imports.misc.fileUtils;
+const { ControlsState } = imports.ui.overviewControls;
const GnomeShellIface = loadInterfaceXML('org.gnome.Shell');
const ScreenSaverIface = loadInterfaceXML('org.gnome.ScreenSaver');
}
ShowApplications() {
- Main.overview.viewSelector.showApps();
+ Main.overview.show(ControlsState.APP_GRID);
}
GrabAcceleratorAsync(params, invocation) {
if (Main.overview.visible)
Main.overview.hide();
else
- this.showApps();
+ Main.overview.show(ControlsState.APP_GRID);
});
global.stage.add_action(gesture);
Main.overview.show();
}
- showApps() {
- this._showAppsButton.checked = true;
- Main.overview.show();
- }
-
prepareToEnterOverview() {
this.show();
this.reset();